package com.zareal.feign;

import com.zareal.dot.PutApplicationDto;
import com.zareal.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-purchase",fallbackFactory = ProductFeignClientFallbackFactory.class)
public interface PurChaseFeignClient {
    /**
     * 采购
     */
    @RequestMapping(value="/application/purcharseproduct",method= RequestMethod.POST)
    public JSONResult purcharseProduct(@RequestBody PutApplicationDto putApplicationDto);
    /**
     * 审批通过
     */
    @RequestMapping(value="/application/passapplication/{id}",method= RequestMethod.GET)
    public JSONResult passApplication(@PathVariable Long id);
    /**
     * 审批失败
     */
    @RequestMapping(value="/application/failapplication/{id}",method= RequestMethod.GET)
    public JSONResult failApplication(@PathVariable Long id);
}
